package org.picWeb.util.dialect;


public class HSQLDialect extends Dialect{

	public HSQLDialect() {

	}

	public String getLimitString(String sql, int offset, int limit) {
		boolean hasOffset = offset > 0;

		return new StringBuffer(sql.length() + 10).append(sql).insert(sql.toLowerCase().indexOf("select") + 6, hasOffset ? " limit " + offset + " " + limit : " top " + limit).toString();
	}
}
